<?php
try{
?>
<div  class="box">
      <div class="b-title">
            <div class="bt-wrapper">Kết quả tìm kiếm</div>
      </div>
      <div class="b-container">
      <?php
      if(isset($this->posts) && count($this->posts) > 0){
            foreach($this->posts as $post){
                   $arrImages = explode('@', $post->feature_image);
            ?>
        <div class="product">
            <a href="<?php echo $this->url(array("slug" => $post->slug), "post_view");?>" title="">
            <?php
            if(extension_loaded("gd") && function_exists("exec") ){
            ?>
                <img src="<?php echo PUBLIC_URL.'/plugins/phpThumb/phpThumb.php?src='.$arrImages[0].'&amp;w=145&amp;h=95'?>" alt="<?php echo $post->title?>"/>
            <?php }else{?>
                <img src="<?php echo $arrImages[0];?>" alt="<?php echo $post->title?>" width="145px" height="100px"/>
            <?php }?>

            </a>
            <div>
              <h4><a href="<?php echo $this->url(array("slug" => $post->slug), "post_view");?>"><?php echo $post->title;?></a></h4>
                                <span class="price">Giá: <?php echo number_format($post->price);?></span>
              <span class="hot"></span>
            </div>
                                            </div>
            <?php
            }
            ?>
            <div class="clearfix"></div>
      <?php
      }else{
      ?>
      <span class="error">Không tìm thấy sản phẩm phù hợp</span>
      <?php
      }
      ?>
      </div>
</div>
<?php
 }  catch (Exception $ex){
                            echo $ex->getMessage();
                        }
?>